package com.cnhis.cloudhealth.clinical.hosnurse.hosdoctor.bo;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cnhis.cloudhealth.clinical.hosnurse.hosdoctor.dao.HosDoctorDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;

@Service
public class HosDoctorBo {
 @Resource
 private HosDoctorDao hosDoctorDao;
 
 public ModelVo getDoctorPosition(Map map) throws Exception{
	 ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosDoctorDao.getDoctorPosition(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
 }
  
   public ModelVo  queryClinicalDoctor(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryClinicalDoctor(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
   }
   public ModelVo  queryHosDoctor(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryHosDoctor(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
   }
   public ModelVo queryMainTreamentDoctor(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
	 		List list =null;
	 		try {
	 			String parav = hosDoctorDao.parav177();
	 			map.put("Parav", parav);
	 			list=hosDoctorDao.queryMainTreamentDoctor(map);
	 			
	 		} catch (Exception e) {
	 			e.printStackTrace();
	 			mo.setResult(StaticKeys.OH_FALSE);
	 			return mo;
	 		}
	 		mo.setList(list);
	 		mo.setResult(StaticKeys.OH_SUCCESS);
	 		mo.setRows(list);
	 		return mo;
   }
   public ModelVo queryHeadDoctor(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryHeadDoctor(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
   }
   public ModelVo queryDutyNurse(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryDutyNurse(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo; 
   }
   public ModelVo queryChargeNurse(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryChargeNurse(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo; 
   }
   public ModelVo queryMatronNurse(Map map)throws Exception{
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.queryMatronNurse(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
   }
   
   public ModelVo qualityControlLevelOne(Map map)throws Exception{
	   
	   ModelVo mo = new ModelVo();
		List list =null;
		try {
			String parav = hosDoctorDao.parav177();
			map.put("Parav", parav);
			list=hosDoctorDao.qualityControlLevelOne(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
	 
	 public ModelVo qualityControlLevelTwo(Map map)throws Exception{
		 ModelVo mo = new ModelVo();
			List list =null;
			try {
				String parav = hosDoctorDao.parav177();
				map.put("Parav", parav);
				list=hosDoctorDao.qualityControlLevelTwo(map);
				
			} catch (Exception e) {
				e.printStackTrace();
				mo.setResult(StaticKeys.OH_FALSE);
				return mo;
			}
			mo.setList(list);
			mo.setResult(StaticKeys.OH_SUCCESS);
			mo.setRows(list);
			return mo;
		 
	 }
}
